﻿// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.

using System.Collections.Generic;
using System.Threading.Tasks;
using Abp.Application.Services;
using GCT.Foundation.CacheState.Dtos;

namespace GCT.Foundation.CacheState
{

    /// <summary>
    /// 缓存监控服务接口
    /// </summary>
    public interface ICacheStateAppService : IApplicationService
    {
        /// <summary>
        /// 获取全部缓存键
        /// </summary>
        /// <returns></returns>
        List<GetAllCacheKeyOutput> GetAllCacheKey();

        /// <summary>
        /// 获取缓存值
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        Task<string> Get(string key);

        /// <summary>
        /// 清空数据库
        /// </summary>
        /// <returns></returns>
        Task FlushDb();

        /// <summary>
        /// 删除Key
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        Task Delete(string key);

        /// <summary>
        /// 删除命名空间
        /// </summary>
        /// <param name="key"></param>
        /// <returns></returns>
        Task DeleteNameSpace(string key);

        /// <summary>
        /// 添加测试缓存数据
        /// </summary>
        /// <returns></returns>
        Task AddCacheTest();
    }
}
